package cn.lizemin;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author: lizemin
 * @version: 1.0
 */
@Component
@EnableScheduling
public class MyTask {
//    @Scheduled(cron = "0/1 * * * * ?")
    @Scheduled(fixedRate = 1000)
    public void printHello(){
        System.out.println("hello..." + LocalDateTime.now());

    }


}
